import React, { Component } from 'react'
import '../index.css'

export default class GetCommit extends Component {
  state = {
    value: '',
  }

  onChange = (e) => {
    this.setState({
      value: e.target.value,
    })
  }
  onClickChange = () => {
    console.log(this.state.value)
  }
  render() {
    return (
      <div className="comments">
        <h3 className="comm-head">评论</h3>
        <div className="comm-input">
          <textarea
            value={this.state.value}
            onChange={this.onChange}
            placeholder="爱发评论的人，运气都很棒"
          ></textarea>
          <div className="foot">
            <div className="word">0/100</div>
            <div className="btn" onClick={this.onClickChange}>
              发表评论
            </div>
          </div>
        </div>
      </div>
    )
  }
}
